<?php

declare(strict_types=1);
namespace App\Controller\Api;

use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use App\Controller\AbstractController;
use App\Service\FaceService\FaceService;

/**
 * @Controller(prefix="/Face")
 * 面部识别中心 
 */
class FaceController extends AbstractController
{
    /**
     * 识别身份证
     * @RequestMapping(path="ocridcard", methods="POST")
     * @return string[]
     */
    public function ocrIdCard( RequestInterface $request,FaceService $faceService ) 
    {
        return $faceService->ocrIdCard($request->getParsedBody());
    }  
    
    /**
     * 消息处理
     * @RequestMapping(path="messagedeal", methods="POST")
     * @return string[]
     */
    public function messageDeal( RequestInterface $request,FaceService $faceService ) 
    {
        
        return $faceService->messageDeal($request->getParsedBody());
    } 
}
